﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;

namespace Lilium.Web.Mvc.AjaxControlToolkit
{
	[RequiredResource(typeof(CommonToolkitScripts))]
	[RequiredResource(typeof(PopupExtender))]
	[RequiredResource(typeof(ThreadingScripts))]
	[CssReference(Constants.ToolkitLibraryName, "ColorPicker.ColorPicker.css")]
	[ToolkitScriptReference("ColorPicker.ColorPickerBehavior.js")]
	public class ColorPickerExtender: ToolkitExtenderBase
	{
		public ColorPickerExtender(string elementID)
			: base("AjaxControlToolkit.ColorPickerBehavior", elementID)
		{
		}

		#region public bool EnabledOnClient

		private bool m_EnabledOnClient = true;

		[DefaultValue(true)]
		[ExtenderControlProperty]
		[ClientPropertyName("enabled")]
		public bool EnabledOnClient { [DebuggerNonUserCodeAttribute] get { return m_EnabledOnClient; } [DebuggerNonUserCodeAttribute] set { m_EnabledOnClient = value; } }

		#endregion

		#region public string PopupButtonID

		private string m_PopupButtonID;

		[DefaultValue("")]
		[ExtenderControlProperty]
		[ClientPropertyName("button")]
		[ElementReference]
		//[IDReferenceProperty]
		[SuppressMessage("Microsoft.Naming", "CA1706:ShortAcronymsShouldBeUppercase", Justification = "Following ASP.NET AJAX pattern")]
		public string PopupButtonID { [DebuggerNonUserCodeAttribute] get { return m_PopupButtonID ?? string.Empty; } [DebuggerNonUserCodeAttribute] set { m_PopupButtonID = value; } }

		#endregion

		#region public string SampleControlID

		private string m_SampleControlID;

		[DefaultValue("")]
		[ExtenderControlProperty]
		[ClientPropertyName("sample")]
		[ElementReference]
		//[IDReferenceProperty]
		[SuppressMessage("Microsoft.Naming", "CA1706:ShortAcronymsShouldBeUppercase", Justification = "Following ASP.NET AJAX pattern")]
		public string SampleControlID { [DebuggerNonUserCodeAttribute] get { return m_SampleControlID ?? string.Empty; } [DebuggerNonUserCodeAttribute] set { m_SampleControlID = value; } }

		#endregion

		#region public PositioningMode PopupPosition

		private PositioningMode m_PopupPosition = PositioningMode.BottomLeft;

		[ExtenderControlProperty]
		[ClientPropertyName("popupPosition")]
		[DefaultValue(PositioningMode.BottomLeft)]
		[Description("Indicates where you want the color picker displayed relative to the textbox.")]
		public PositioningMode PopupPosition { [DebuggerNonUserCodeAttribute] get { return m_PopupPosition; } [DebuggerNonUserCodeAttribute] set { m_PopupPosition = value; } }

		#endregion

		#region public string SelectedColor

		private string m_SelectedColor;

		[DefaultValue("")]
		[ExtenderControlProperty]
		[ClientPropertyName("selectedColor")]
		public string SelectedColor { [DebuggerNonUserCodeAttribute] get { return m_SelectedColor ?? string.Empty; } [DebuggerNonUserCodeAttribute] set { m_SelectedColor = value; } }

		#endregion

		#region public string OnClientShowing

		private string m_OnClientShowing;

		[DefaultValue("")]
		[ExtenderControlEvent]
		[ClientPropertyName("showing")]
		public string OnClientShowing { [DebuggerNonUserCodeAttribute] get { return m_OnClientShowing ?? string.Empty; } [DebuggerNonUserCodeAttribute] set { m_OnClientShowing = value; } }

		#endregion

		#region public string OnClientShown

		private string m_OnClientShown;

		[DefaultValue("")]
		[ExtenderControlEvent]
		[ClientPropertyName("shown")]
		public string OnClientShown { [DebuggerNonUserCodeAttribute] get { return m_OnClientShown ?? string.Empty; } [DebuggerNonUserCodeAttribute] set { m_OnClientShown = value; } }

		#endregion

		#region public string OnClientHiding

		private string m_OnClientHiding;

		[DefaultValue("")]
		[ExtenderControlEvent]
		[ClientPropertyName("hiding")]
		public string OnClientHiding { [DebuggerNonUserCodeAttribute] get { return m_OnClientHiding ?? string.Empty; } [DebuggerNonUserCodeAttribute] set { m_OnClientHiding = value; } }

		#endregion

		#region public string OnClientHidden

		private string m_OnClientHidden;

		[DefaultValue("")]
		[ExtenderControlEvent]
		[ClientPropertyName("hidden")]
		public string OnClientHidden { [DebuggerNonUserCodeAttribute] get { return m_OnClientHidden ?? string.Empty; } [DebuggerNonUserCodeAttribute] set { m_OnClientHidden = value; } }

		#endregion

		#region public string OnClientColorSelectionChanged

		private string m_OnClientColorSelectionChanged;

		[DefaultValue("")]
		[ExtenderControlEvent]
		[ClientPropertyName("colorSelectionChanged")]
		public string OnClientColorSelectionChanged { [DebuggerNonUserCodeAttribute] get { return m_OnClientColorSelectionChanged ?? string.Empty; } [DebuggerNonUserCodeAttribute] set { m_OnClientColorSelectionChanged = value; } }

		#endregion
	}
}